<script lang="ts" setup>
const props = defineProps<{ title?: string }>();
</script>

<template>
	<view class="um-divider">
		<view class="um-divider__title" v-if="title">{{ title }}</view>
	</view>
</template>

<style lang="scss" scoped>
.um-divider {
	width: 100%;
	display: flex;
	align-items: center;

	&__title {
		text-wrap: nowrap;
		padding: 0 20rpx;
		font-size: 24rpx;
	}

	&::before {
		display: block;
		width: 50%;
		content: '';
		height: 1px;
		background-color: #000;
	}

	&::after {
		display: block;
		width: 50%;
		content: '';
		height: 1px;
		background-color: #000;
	}
}
</style>
